package com.hue.springbootrabbit.listener;

import com.hue.springbootrabbit.domain.User;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author 姚凤桥
 * @Date 2022/1/4 17:43
 * @Description:
 */
@Component
public class TestListener {
    @RabbitListener(queues = "test.queue")
    public void testQueue(Message message, Channel channel, User user) {
        System.out.println("====================");
        System.out.println(user);
    }
}
